package com.ruoyi.project.system.question.domain;

import com.ruoyi.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 答题详情对象 dj_exam_detail
 * 
 * @author ruoyi
 * @date 2023-07-15
 */
public class ExamDetail extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 详情ID */
    private Long id;

    /** 关联记录ID */
    private Long recordId;

    /** 题目ID */
    private Long questionId;

    /** 用户答案 */
    private String userAnswer;

    /** 是否正确（0错误 1正确） */
    private Integer isCorrect;

    /** 创建时间 */
    private Date createTime;
    
    /** 题目信息 */
    private Question question;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setRecordId(Long recordId) 
    {
        this.recordId = recordId;
    }

    public Long getRecordId() 
    {
        return recordId;
    }
    public void setQuestionId(Long questionId) 
    {
        this.questionId = questionId;
    }

    public Long getQuestionId() 
    {
        return questionId;
    }
    public void setUserAnswer(String userAnswer) 
    {
        this.userAnswer = userAnswer;
    }

    public String getUserAnswer() 
    {
        return userAnswer;
    }
    public void setIsCorrect(Integer isCorrect) 
    {
        this.isCorrect = isCorrect;
    }

    public Integer getIsCorrect() 
    {
        return isCorrect;
    }
    public void setCreateTime(Date createTime) 
    {
        this.createTime = createTime;
    }

    public Date getCreateTime() 
    {
        return createTime;
    }
    
    public Question getQuestion() {
        return question;
    }
    
    public void setQuestion(Question question) {
        this.question = question;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("recordId", getRecordId())
            .append("questionId", getQuestionId())
            .append("userAnswer", getUserAnswer())
            .append("isCorrect", getIsCorrect())
            .append("createTime", getCreateTime())
            .append("question", getQuestion())
            .toString();
    }
}